def getvalue_or_error(dictionary, key):
    if key not in dictionary:
        raise Exception('Can\'t find {}'.format(key))
    else:
        return dictionary[key]